package com.naiterui.ehp.bp.bo.groupConsult;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author gaoliangliang
 * @date 2022/8/3
 * @since 0.0.1
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class GroupConsultSignParamBO implements Serializable {

    public static final int OPTION_TYPE_TARGET = 1;
    public static final int OPTION_TYPE_SOURCE = 2;
    private int opinionType;

    private Long groupConsultId;
    private Long patientId;
    private Long inquirerId;
    private String name;
    private Integer gender;
    private String departmentName;
    private String age;


    /**
     * 发起方 医生名称
     */
    private String sourceDoctorName;

    /**
     * 发起方 医生ID
     */
    private Long sourceDoctorId;

    /**
     * 受邀方医生名称
     */
    private String targetDoctorName;

    /**
     * 受邀方医生ID
     */
    private Long targetDoctorId;

    /**
     * PDF文件路径
     */
    private String pdfPath;
    /**
     * 预签署unionId
     */
    private String unionId;
    /**
     * pin
     */
    private String pin;

    public Long fetchDoctorId() {
        if (OPTION_TYPE_TARGET == this.opinionType) {
            return this.targetDoctorId;
        }
        return this.sourceDoctorId;
    }

}